﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Security.Principal;
using System.Web.Security;
using System.Data;
using SuperJ.CMS.Services;
using SuperJ.CMS.Interfaces.Services;
using System.Runtime.CompilerServices;
namespace SuperJ.CMS.Web.Areas.Admin.Controllers
{
    public class HomeController : Controller
    {
        //
        private SuperJ.CMS.Interfaces.Services.IAdminMenuService adminMenuService;
        public HomeController(IAdminMenuService ams)
        {
            this.adminMenuService = ams;
        }
        
        public ActionResult Index(string theme)
        {

            if (string.IsNullOrEmpty(theme))
            {
                ViewBag.Theme = "base";
            }
            else
            {
                ViewBag.Theme = theme;
            }

            return View(adminMenuService.GetAdminMenu());
        }
        [HttpGet]
        public ActionResult AdminLogin()
        {
            return View();
        }
        [HttpPost]
        public ActionResult AdminLogin(SuperJ.CMS.ViewModels.AdminLogin lo)
        {
            return RedirectToAction("Index");
        }
    }
}
